<li class="list-group-item d-flex justify-content-between">
    <a class="flex-shrink-0 align-self-center" href="{{route('users.show',$post->user->id)}}">
        <img class="img-thumbnail" src="{{$post->user->getAvatar()}}" alt="{{$post->user->name}}" width="52">
    </a>
    <div class="d-flex flex-column flex-grow-1 px-4 py-2">
        <h6 class="text-info">{{$post->user->name}} <small class="text-secondary" style="font-size: 12px"> {{$post->created_at->diffForHumans()}}</small></h6>
        <small class="text-secondary">{{$post->content}}</small>
    </div>
    @can('destroy',$post)
        <form action="{{route('post.destroy',$post->id)}}" method="POST" class="align-self-center" onsubmit="return confirm('您真的要删除吗？')">
            @csrf
            {{method_field('DELETE')}}
            <button type="submit" class="btn btn-danger btn-sm" style="width: max-content;">删除</button>
        </form>
    @endcan
</li>
